package javase2.day08.demo2;
//递归计算阶乘
public class Demo03 {
    public static void main(String[] args) {
        int jiecheng = jiecheng(3);
        System.out.println(jiecheng);//6

    }

    public static int jiecheng(int i){
        if (i==1){
            return 1;
        }
        return i*jiecheng(i-1);
    }
}
